package it.oneb.study.spring;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class SpringMain
{
	public static void main(String[] args)
	{
		
		// 根据classpath下面的配置文件创建context
		ApplicationContext context = new ClassPathXmlApplicationContext("bean.xml");  
		 
		// 从context获取bean
		  HelloWorld obj = (HelloWorld) context.getBean("helloBean");  

	      obj.printHelloWorld();  


		

	}
}
